This page last changed on Jun 24, 2005 by orogers.

Steps:

  1. Create a Class Library project to build the assembly that will contain your custom builder plug-in. The assembly that it produces should be named: 'ccnet.*.plugin.dll' (where the star represents the name you choose).
  2. Add your new customer builder class.
  3. The class must implement the ThoughtWorks.CruiseControl.Core.ITask interface (found in the ccnet.core assembly)
  4. Mark up your class with the NetReflector ReflectorType attribute. The name argument supplied to the attribute is the name of the element/attribute that will appear in the configuration file
  5. Add whatever configuration properties you need, marking them up with NetReflector ReflectorProperty attributes accordingly.
  6. Implement the Run method. The supplied IntegrationResult should provide you with everything that you need to know about the current build.
  7. Compile the assembly.
  8. Copy the assembly into the folder containing the CruiseControl.NET assemblies (or the current directory that you are running the ccnet server from).
  9. Modify your ccnet.config file in accordance with the sample config file below.

For more information, please take a look at the sample code contained in the folder /docs/developer/samples.

Sample Builder Class

using System;
using Exortech.NetReflector;
using ThoughtWorks.CruiseControl.Core;

namespace ThoughtWorks.CruiseControl.Sample.Builder
{
	[ReflectorType("myBuilder")]
	public class NAntBuilder : ITask
	{
		public void Run(IntegrationResult result)
		{
			Console.WriteLine("Hello World!");
		}
	}
}

Sample Config File

<cruisecontrol>
	<project name="myproject">
		<builder type="mybuilder">
			<!-- include custom builder properties here -->
		</builder>
		<!-- include other project elements here -->
	</project>
</cruisecontrol>

You think I could get an example of said custom build properties. Do these properties involve passing arguments to the plugin or setting fields in the plugin class?

-ChazZ
Posted by at May 05, 2004 13:22

How would one go about making a plugin for a custom source control provider? Do these instructions roughly apply (but implementing ISourceControl instead of IBuilder?)

Posted by at Aug 27, 2004 14:40

Oh, my email is nospamplease75@yahoo.com. I asked the last question.
http://haacked.com/

Posted by at Aug 27, 2004 14:41
Document generated by Confluence on Jun 26, 2005 17:22